From 804476a07f8b3a93aa706386cfe14826c34cc590 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Wed, 11 Oct 2017 08:06:33 +0200 Subject: [PATCH] eventcontrollerscroll: Emit ::scroll for -1/+1 discrete steps The > 1 meant it only emits the signal for -2/+2 steps. --- gtk/gtkeventcontrollerscroll.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gtk/gtkeventcontrollerscroll.c b/gtk/gtkeventcontrollerscroll.c index a250bfb8aa..407f254c8b 100644 --- a/gtk/gtkeventcontrollerscroll.c +++ b/gtk/gtkeventcontrollerscroll.c @@ -239,14 +239,14 @@ gtk_event_controller_scroll_handle_event (GtkEventController *controller, scroll->cur_dy += dy; dx = dy = 0; - if (ABS (scroll->cur_dx) > 1) + if (ABS (scroll->cur_dx) >= 1) { steps = trunc (scroll->cur_dx); scroll->cur_dx -= steps; dx = steps; } - if (ABS (scroll->cur_dy) > 1) + if (ABS (scroll->cur_dy) >= 1) { steps = trunc (scroll->cur_dy); scroll->cur_dy -= steps; -- 2.30.2